﻿#Region "Copyright"
'————————————————————————————————————————
'	创建人员(Creator)    ：Huangyd
'	创建日期(Date)       ：2012-07-14
'   联系方式(Email)      ：aj-ayumi@163.com; gajayumi@gmail.com; ajayumi@me.com
'   描    述(Description)：
'
'	Copyright (C) 2012 ajayumi 版权所有
'————————————————————————————————————————
#End Region
Imports System.IO

Namespace Xml.Serialization
    Public Interface IGenericFormatter
        ''' <summary>
        ''' 序列化
        ''' </summary>
        ''' <typeparam name="T"></typeparam>
        ''' <param name="serializationStream">要序列化为的流</param>
        ''' <param name="model">位于要序列化的对象</param>
        Sub Serialize(Of T)(ByVal serializationStream As Stream, ByVal model As T)

        Sub Serialize(Of T)(ByVal serializationStream As Stream, ByVal model As T, ByVal ParamArray params() As Object)


        ''' <summary>
        ''' 反序列化
        ''' </summary>
        ''' <typeparam name="T"></typeparam>
        ''' <param name="serializationStream">要序列化为的流</param>
        ''' <returns></returns>
        Function DeSerialize(Of T)(ByVal serializationStream As Stream) As T

        ''' <summary>
        ''' 反序列化
        ''' </summary>
        ''' <param name="serializationStream"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function DeSerialize(ByVal serializationStream As Stream) As Object()

        ''' <summary>
        ''' 反序列化
        ''' </summary>
        ''' <param name="serializationStream"></param>
        ''' <param name="count"></param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        Function DeSerialize(ByVal serializationStream As Stream, ByVal count As Integer) As Object()

    End Interface
End Namespace

